home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: Henry Cross <hcross@ix.netcom.com>
- Newsgroups: comp.lang.c
- Subject: Re: && operator question
- Date: Sun, 18 Feb 1996 08:37:09 -0800
- Organization: i586 Box @Irvine, Ca.
- Message-ID: <312755B5.2C7A@ix.netcom.com>
- References: <4fu69a$b7e@sphinx.Gsu.EDU> <31236240.1417@oc.com> <fcusack-1502961453260001@mudskipper.cac.psu.edu> <3123AAB9.FBE@oc.com>
- NNTP-Posting-Host: irv-ca13-08.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-NETCOM-Date: Sun Feb 18 8:36:21 AM PST 1996
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- Larry Weiss wrote:
- >
- > frank. wrote:
- > >
- > > In article <31236240.1417@oc.com>, Larry Weiss <lfw@oc.com> wrote:
- > >
- > > > Matthew A Johnson wrote:
- > > > > if(expression1 && expression2)
- > > > > some statement;
- > > > > My question is, if expression1 is false will expression2 get evaluated at
- > > > > all?
- >
- > > > No. Why do you ask that question here?
- >
- > > Why wouldn't he ask it here? It is a C question...
- >
- > I am trying to understand why someone would go to the trouble (and have the
- > patience) to ask such a trivial question that could easily be answered by
- > consultation to any C language textbook.
- >
- > I have a slightly hidden agenda as well by posting this reply in the newsgroup
- > ....that is the general education of the infrequent readers of this group....
- > that such simple questions should first be resolved privately. Or at least,
- > disquise the question in sheep's clothing....for example:
- >
- > Why is C designed to require short circuit evaluation with respect to
- > some operators (for instance &&) ?
- >
- > Isn't C somewhat unique in mandating short circuit evaluation for the
- > logical AND (&&) operator? BASIC and FORTRAN don't do this.
- >
- > Why did the designers of C mandate the short circuit evaluation of the
- > && operator?
- >
- > That way, you'll be quickly informed if your assumption is incorrect
- > (you get to ask the question) and be much less likely to get "educated"
- > about the nettiquete issues. You also just might learn some background
- > about the C language, as well as the operational realities. But better
- > by far to just read a book (you'll get the answer instantly).
-
- While I agree a look in any C text should've cleared this up. I DO
- NOT agree that simply stating the question in an overly verbose and
- pretentious manner makes it somehow OK. That's akin to the old
- verbage that BS that has passed thru a computer has somehow become
- enobled. Poppy cock! It's still BS.
- In any event as long as the poster has made some attempt to resolve
- his/her own question thru traditional means, vice knee jerk reaction
- to post, the question is legitimate.
-
- regards,
- H.Cross
- hcross@ix.netcom.com
-